package com.hqj.client.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.hqj.client.entity.Comments;
import com.hqj.client.mapper.CommentsMapper;
import com.hqj.client.service.CommentsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class CommentsServiceImpl implements CommentsService{
    //注入mapper对象
    @Resource
    private CommentsMapper commentsMapper;
    @Override
    public Integer insert1(Comments comments) {
        int i = commentsMapper.insert(comments);
        return i;
    }

    @Override
    public Integer deleteById(Integer id) {
        int i = commentsMapper.deleteById(id);
        return i;
    }

    @Override
    public Comments selectById(Integer id) {
        Comments comments = commentsMapper.selectById(id);
        return comments;
    }

    @Override
    public Integer updata(Comments comments) {
        Integer i = commentsMapper.updateById(comments);
        return i;
    }
}
